<template>
    <div>
        <div class="back" @click="goBack"><van-icon color="#fff" name="arrow-left" /></div>
    </div>
</template>

<script>
export default {
    name: 'BackBtn',
    methods: {
        goBack() {
            // 返回上一页
            this.$router.go(-1)
        }
    }
}
</script>

<style lang="less" scoped>
.back {
    position: fixed;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, .3);
    text-align: center;
    line-height: 30px;
    top: 10px;
    left: 10px;
    z-index: 999;
}
</style>